// 判断是否是移动端设备
export const isMobile = (() => {
    return window.navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
})()

// 判断元素是否高度是否大于视口
export const elLargeViewport = (el: string | HTMLElement) => {
    if (typeof el === 'string') {
        el = document.querySelector(el) as HTMLElement
    } else if (el instanceof HTMLElement) {
        console.log(el);

    } else {
        return false
    }
    return el.clientHeight >= window.screen.availHeight
}